3.180 \(\int (a+a \tan ^2(c+d x))^3 \, dx\)

Optimal. Leaf size=50 \[ \frac{a^3 \tan ^5(c+d x)}{5 d}+\frac{2 a^3 \tan ^3(c+d x)}{3 d}+\frac{a^3 \tan (c+d x)}{d} \]

[Out]

(a^3*Tan[c + d*x])/d + (2*a^3*Tan[c + d*x]^3)/(3*d) + (a^3*Tan[c + d*x]^5)/(5*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0301843, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3657, 12, 3767} \[ \frac{a^3 \tan ^5(c+d x)}{5 d}+\frac{2 a^3 \tan ^3(c+d x)}{3 d}+\frac{a^3 \tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Tan[c + d*x]^2)^3,x]

[Out]

(a^3*Tan[c + d*x])/d + (2*a^3*Tan[c + d*x]^3)/(3*d) + (a^3*Tan[c + d*x]^5)/(5*d)

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin{align*} \int \left (a+a \tan ^2(c+d x)\right )^3 \, dx &=\int a^3 \sec ^6(c+d x) \, dx\\ &=a^3 \int \sec ^6(c+d x) \, dx\\ &=-\frac{a^3 \operatorname{Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac{a^3 \tan (c+d x)}{d}+\frac{2 a^3 \tan ^3(c+d x)}{3 d}+\frac{a^3 \tan ^5(c+d x)}{5 d}\\ \end{align*}

Mathematica [A]  time = 0.0973905, size = 38, normalized size = 0.76 \[ \frac{a^3 \left (\frac{1}{5} \tan ^5(c+d x)+\frac{2}{3} \tan ^3(c+d x)+\tan (c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Tan[c + d*x]^2)^3,x]

[Out]

(a^3*(Tan[c + d*x] + (2*Tan[c + d*x]^3)/3 + Tan[c + d*x]^5/5))/d

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 35, normalized size = 0.7 \begin{align*}{\frac{{a}^{3}}{d} \left ({\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{5}}{5}}+{\frac{2\, \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3}}+\tan \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*tan(d*x+c)^2)^3,x)

[Out]

1/d*a^3*(1/5*tan(d*x+c)^5+2/3*tan(d*x+c)^3+tan(d*x+c))

________________________________________________________________________________________

Maxima [B]  time = 1.64202, size = 138, normalized size = 2.76 \begin{align*} a^{3} x + \frac{{\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a^{3}}{15 \, d} + \frac{{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{3}}{d} - \frac{3 \,{\left (d x + c - \tan \left (d x + c\right )\right )} a^{3}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

a^3*x + 1/15*(3*tan(d*x + c)^5 - 5*tan(d*x + c)^3 - 15*d*x - 15*c + 15*tan(d*x + c))*a^3/d + (tan(d*x + c)^3 +
 3*d*x + 3*c - 3*tan(d*x + c))*a^3/d - 3*(d*x + c - tan(d*x + c))*a^3/d

________________________________________________________________________________________

Fricas [A]  time = 1.00163, size = 104, normalized size = 2.08 \begin{align*} \frac{3 \, a^{3} \tan \left (d x + c\right )^{5} + 10 \, a^{3} \tan \left (d x + c\right )^{3} + 15 \, a^{3} \tan \left (d x + c\right )}{15 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

1/15*(3*a^3*tan(d*x + c)^5 + 10*a^3*tan(d*x + c)^3 + 15*a^3*tan(d*x + c))/d

________________________________________________________________________________________

Sympy [A]  time = 0.650289, size = 54, normalized size = 1.08 \begin{align*} \begin{cases} \frac{a^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac{2 a^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} + \frac{a^{3} \tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a \tan ^{2}{\left (c \right )} + a\right )^{3} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)**2)**3,x)

[Out]

Piecewise((a**3*tan(c + d*x)**5/(5*d) + 2*a**3*tan(c + d*x)**3/(3*d) + a**3*tan(c + d*x)/d, Ne(d, 0)), (x*(a*t
an(c)**2 + a)**3, True))

________________________________________________________________________________________

Giac [B]  time = 1.56029, size = 401, normalized size = 8.02 \begin{align*} -\frac{15 \, a^{3} \tan \left (d x\right )^{5} \tan \left (c\right )^{4} + 15 \, a^{3} \tan \left (d x\right )^{4} \tan \left (c\right )^{5} + 10 \, a^{3} \tan \left (d x\right )^{5} \tan \left (c\right )^{2} - 30 \, a^{3} \tan \left (d x\right )^{4} \tan \left (c\right )^{3} - 30 \, a^{3} \tan \left (d x\right )^{3} \tan \left (c\right )^{4} + 10 \, a^{3} \tan \left (d x\right )^{2} \tan \left (c\right )^{5} + 3 \, a^{3} \tan \left (d x\right )^{5} - 5 \, a^{3} \tan \left (d x\right )^{4} \tan \left (c\right ) + 60 \, a^{3} \tan \left (d x\right )^{3} \tan \left (c\right )^{2} + 60 \, a^{3} \tan \left (d x\right )^{2} \tan \left (c\right )^{3} - 5 \, a^{3} \tan \left (d x\right ) \tan \left (c\right )^{4} + 3 \, a^{3} \tan \left (c\right )^{5} + 10 \, a^{3} \tan \left (d x\right )^{3} - 30 \, a^{3} \tan \left (d x\right )^{2} \tan \left (c\right ) - 30 \, a^{3} \tan \left (d x\right ) \tan \left (c\right )^{2} + 10 \, a^{3} \tan \left (c\right )^{3} + 15 \, a^{3} \tan \left (d x\right ) + 15 \, a^{3} \tan \left (c\right )}{15 \,{\left (d \tan \left (d x\right )^{5} \tan \left (c\right )^{5} - 5 \, d \tan \left (d x\right )^{4} \tan \left (c\right )^{4} + 10 \, d \tan \left (d x\right )^{3} \tan \left (c\right )^{3} - 10 \, d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + 5 \, d \tan \left (d x\right ) \tan \left (c\right ) - d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^3,x, algorithm="giac")

[Out]

-1/15*(15*a^3*tan(d*x)^5*tan(c)^4 + 15*a^3*tan(d*x)^4*tan(c)^5 + 10*a^3*tan(d*x)^5*tan(c)^2 - 30*a^3*tan(d*x)^
4*tan(c)^3 - 30*a^3*tan(d*x)^3*tan(c)^4 + 10*a^3*tan(d*x)^2*tan(c)^5 + 3*a^3*tan(d*x)^5 - 5*a^3*tan(d*x)^4*tan
(c) + 60*a^3*tan(d*x)^3*tan(c)^2 + 60*a^3*tan(d*x)^2*tan(c)^3 - 5*a^3*tan(d*x)*tan(c)^4 + 3*a^3*tan(c)^5 + 10*
a^3*tan(d*x)^3 - 30*a^3*tan(d*x)^2*tan(c) - 30*a^3*tan(d*x)*tan(c)^2 + 10*a^3*tan(c)^3 + 15*a^3*tan(d*x) + 15*
a^3*tan(c))/(d*tan(d*x)^5*tan(c)^5 - 5*d*tan(d*x)^4*tan(c)^4 + 10*d*tan(d*x)^3*tan(c)^3 - 10*d*tan(d*x)^2*tan(
c)^2 + 5*d*tan(d*x)*tan(c) - d)